package com.aikon.wht.io;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by haitao.wang on 2016/12/16.
 */
public class TestOfBio {
    public static void main(String[] args) throws IOException {
        int port = 8080;
        if (args != null && args.length > 0) {
            port = Integer.valueOf(args[0]);
        }
        ServerSocket serverSocket = new ServerSocket(port);
        System.out.println("Server socket start in "+port);
        while (true) {
            Socket socket = serverSocket.accept();
        }

    }
}
